package com.demo.com.timer;

import org.omg.PortableServer.LIFESPAN_POLICY_ID;
import org.testng.annotations.Test;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

public class ForTest {

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            System.out.println(i++);
            System.out.println(i);
        }
    }

    @Test
    public void testPlus() {
        Integer a = 10;
        handle(a);
        System.out.println(a);
    }

    public void handle(Integer a ) {
        a += 10;
        System.out.println("handle--" + a);
    }







    @Test
    public void ListTest(){
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        plus(list);
        System.out.println(list.toString());
    }
    public void plus(List<Integer> list){
        list.add(4);
        list.add(5);
        list.add(6);
        System.out.println("handle--" + list.toString());
    }


}
